package com.jeeplus.modules.work.queue.service;

import com.jeeplus.database.datasource.annotation.DS;
import com.jeeplus.modules.work.queue.mapper.ManageDurationMapper;
import com.jeeplus.modules.work.queue.mapper.RealEstateMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@DS("gxque")
@Service
@RequiredArgsConstructor
@Slf4j
@Transactional(readOnly = true)
public class ManageDurationService {
    private final ManageDurationMapper mapper;
    public List<Map<String,Object>> getRegionalToday(){

        return mapper.getRegionalToday();
    }
    public List<Map<String,Object>> getRegionalLastMonth(){

        return mapper.getRegionalLastMonth();
    }
    public List<Map<String,Object>> getStreetToday(){

        return mapper.getStreetToday();
    }
    public List<Map<String,Object>> getStreetLastMonth(){

        return mapper.getStreetLastMonth();
    }

    @Transactional(readOnly = false)
    public int intoWarning(String id,String name,String doTime,String prewarningValue,String time){
        return mapper.intoWarning(id,name,doTime,prewarningValue,time);
    }
    @Transactional(readOnly = false)
    public int findWarning(String name,String time){
        return mapper.findWarning(name,time);
    }

    public List<Map<String,Object>> departmentList(){
        return  mapper.departmentList();
    }
}
